<?php
    namespace Project\Repositories;
    use DoctrineExtensions\Versionable\Exception;
    use Doctrine\ORM\EntityRepository;

    class User extends EntityRepository
    {    
        public function findNameByRole($role)
        {
            return $this->getEntityManager()->find($this->getEntityName(), 1);
        }
    }